
Uec3.AddAutoPurchaseOrderButton = Ext.extend(AddPurchaseOrderButton, {
	loadBtnsUrl : RES_PATH + '/purchase/loadOnlineBtns.do',
	loadOrdersUrl : RES_PATH + '/purchase/loadOnlineOrders.do',
	purOnlineDeal : function() {
		this.purDeal();
	},
	/**
	 * 在线保存
	 */
	purOnlineSave : function() {
		this.main_win.purchase_status_hidden.setValue('0');
		this.main_win.purchase_wkflId_hidden.setValue('2');
		this.purBatchInsert();
	},
	/**
	 * 在线提交
	 */
	purOnlineSubmit : function() {
		this.main_win.purchase_status_hidden.setValue('2');
		this.main_win.purchase_wkflId_hidden.setValue('2');
		this.purBatchInsert();
	},
	/**
	 * 在线修改
	 */
	purOnlineUpdate : function() {
		this.main_win.purchase_status_hidden.setValue('0');
		this.purBatchUpdate();
	},
	/**
	 * 在线修改并提交
	 */
	purOnlineUpdateToSubmit : function() {
		this.main_win.purchase_status_hidden.setValue('2');
		this.purBatchUpdate();
	},
	purOnlineRestore : function() {
		this.purRestore();
	},
	purOnlineDelete : function() {
		this.purDelete();
	},
	/**
	 * 在线订单新建下一张
	 */
	purOnlineNextOne : function() {
		var desktop = Uec3.App.getDesktop();   
		desktop.launchWindowByParam("addAutoPurchaseOrderWindowCreator",{});
	},
	purOnlineQuery : function() {
		this.purQuery();
	},
	purOnlineAgreeRecieve : function() {
		this.purAgreeRecieve();
	},
	purOnlineReset : function() {
		this.purReset();
	}
});

Uec3.AddAutoPurchaseOrderWindow = Ext.extend(AddPurchaseOrderWindow, {
	buttonMudule : Uec3.AddAutoPurchaseOrderButton,
	initCreateUrl : RES_PATH + '/purchase/onlineToCreate.do',
	loadDetailsUrl : RES_PATH + '/purchase/loadOnlineDetails.do',
	
	initShowUrl : RES_PATH + '/purchase/onlineToShow.do',
	partnerUrl : RES_PATH + "/partner/query_partner!queryPartner.do",
	partnerQualify : '1',
	partnerAddModuleId : {'moduleId' : 'checkCertify'}
		
});

Uec3.AddAutoPurchaseOrderWindowCreator = Ext.extend(AddPurchaseOrderWindowCreator, {
	id : 'addAutoPurchaseOrderWindowCreator',
	init : function() {
		this.ordersName = '在线采购订单';
		this.ordersNameEn = 'online_purchase_order';
	},
	getTypeWindow : function() {
		return Uec3.AddAutoPurchaseOrderWindow;
	}
});
